module.exports = {
  async uploadImage(ctx) {
    // console.log(1111, ctx);
    const path = ctx.request.files.file.filepath;
    const index = path.indexOf("\\uploads");
    let location = "";
    if (index !== -1) {
      location = path.substring(index);
    }
    ctx.body = {
      code: 0,
      message: "上传成功",
      data: {
        location,
      },
    };
  },
};
